﻿using BLL;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Model;
using NPOI.SS.UserModel;
using NPOI.XSSF.UserModel;

namespace WebApi.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class FangHaoController : ControllerBase
    {
        public FangHaoController(FangHao_BLL bll)
        {
            Bll = bll;
        }

        public FangHao_BLL Bll { get; }

        /// <summary>
        /// 房号添加
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        [HttpPost("FangHaoAdd")]
        public IActionResult FangHaoAdd(FangHao_Model m)
        {
            var m1= Bll.FangHaoAdd(m);
            return Ok(new
            {
                data = m1
            });
        }
        /// <summary>
        /// 房号列表
        /// </summary>
        /// <returns></returns>
        [HttpGet("FangHaoShow")]
        public IActionResult FangHaoShow()
        {
            var m1=Bll.FangHaoShow();
            return Ok(new
            {
                data = m1
            });
        }

       

    }
}
